<template>
	<view class="container"> 
		<view class="body">
			<view class="share">
				<image class="share-box-image" src="/static/anchor/pic_yaoqing.jpg"></image>
				<view class="share-box">
					<view class="share-name">
						<image :src="data.avator || '/static/missing-face.png'" class="share-head-image" mode="aspectFill"></image>
						<view class="share-wx-name">
							<text>{{data.user_name}}</text>
							<text class="share-id" v-if="data.share_code !=undefined">分享码:{{data.share_code}}</text>
						</view>
					</view>
					<view>
						<image :src="data.url" class="share-ewm" mode="aspectFill"></image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>  
    export default {
		data(){
			return {
				data:{
					avator:"",
					user_name:"",
					share_code:"",
					url:""
				}
			}
		},
		onShow() {
			this.getData()
		},
		onLoad(options){
			uni.hideShareMenu()
		},
        methods: {
			async getData(){
				let _this=this
				this.$http.sendRequest({
					url:"api/member/shareQrcode",
					success:function(res){
						_this.data=res.data.data
					}
				})
			},
        }  
    }  
</script>  

<style lang='scss'>
	.container{
		background-color: #FF5359;
		height: 1334upx;
		.body{
			.share{
				width: 100%;
				.share-box-image{
					width: 100%;
				}
				.share-box{
					margin: 0 40upx 20upx 40upx;
					padding: 60upx 175upx;
					background-color: #ffffff;
					border-radius: 20upx;
					.share-name{
						display: flex;
						padding: 20upx;
						.share-head-image{
							width: 96upx;
							height: 96upx;
							border-radius: 96upx;
						}
						.share-wx-name{
							font-size: 28upx;
							color: #333333;
							
							.share-id{
								display: block;
								margin-top: 20upx;
							}
						}
					}
					.share-ewm{
						width: 320upx;
						height: 320upx;
					}
				}
			}
			.wechat-box{
				margin: 0 40upx 20upx 40upx;
				padding: 20upx 100upx;
				background-color: #ffffff;
				border-radius: 20upx;
				display: flex;
				.wechat-item{
					font-size: 28upx;
					color: #333333;
					text-align: center;
					width: 50%;
					.wechat-icon{
						width: 100upx;
						height: 100upx;
					}
					text{
						display: block;
						margin-top: 20upx;
					}
				}
			}
		}
	}
</style>
